home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / IIGS / TN.IIGS.010 < prev    next >
Encoding:
Text File  |  1988-12-16  |  1.4 KB  |  41 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. Apple IIGS
  8. #10:    InvalRgn Twist
  9.  
  10. Revised by:    Steven Glass                                     November 1988
  11. Written by:    Guillermo Ortiz                                     April 1987
  12.  
  13. InvalRgn(RgnHandle) accumulates the region to which RgnHandle points into the 
  14. update region of the current window's port; in the process, it makes the 
  15. region global, thus causing problems if later calls expect the region to still 
  16. be local.
  17. _____________________________________________________________________________
  18.  
  19. The region you pass to InvalRgn is local to the window to which it is related; 
  20. however, InvalRgn returns the region in global coordinates.  To preserve the 
  21. original region for your use after the call to InvalRgn, you should duplicate 
  22. it and use the copy to make the call then dispose of the copy when InvalRgn 
  23. returns.  The following example demonstrates the process:
  24.  
  25.     void MyInvalReg(RegHandle)
  26.  
  27.     handle RegHandle;
  28.     {
  29.     handle AuxHandle;
  30.  
  31.     AuxHandle = NewRgn();            /* create room */
  32.     CopyRgn(RegHandle,AuxHandle);    /* make a copy  */
  33.     InvalRgn(AuxHandle);             /* do it with the copy */
  34.     DisposeRgn(AuxHandle);           /* now get rid of it! */
  35.     }
  36.  
  37.  
  38. Further Reference
  39. o    Apple IIGS Toolbox Reference, Volume 2
  40.  
  41.